#include "xqat_figure_bed.h"

xqat_Figure_bed::xqat_Figure_bed()
{
}
void xqat_Figure_bed::Add_treeWidget(QTreeWidget *treeWidget, const QString& data, int treenum)
{
    static int i, j = 0;
    static QString num;
    if(treenum == 0) {
        ++i;
        num = QString::number(i);
    } else if (treenum == 1) {
        ++j;
        num = QString::number(j);
    }
    QTreeWidgetItem *item = new QTreeWidgetItem()  ;
    item->setText(0, num);
    item->setText(1, data);
    item->setFlags(item->flags() | Qt::ItemIsEditable);
    treeWidget->addTopLevelItem(item);
}
